using Business.InventoryQuantityManagement;
using Business.InventoryQuantityManagement.Dto;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;

namespace Business.Controllers
{
    [RemoteService]
    [Area("Business")]
    [Route("api/business/InventoryQuantity")]
    public class InventoryQuantityController : AbpController
    {
        private readonly IInventoryQuantityAppService _InventoryQuantityAppService;

        public InventoryQuantityController(IInventoryQuantityAppService InventoryQuantityAppService)
        {
            _InventoryQuantityAppService = InventoryQuantityAppService;
        }

        [HttpPost]
        [Route("data-post")]
        public Task<InventoryQuantityDto> DataPost(CreateOrUpdateInventoryQuantityDto input)
        {
            return _InventoryQuantityAppService.DataPost(input);
        }

        [HttpPost]
        [Route("delete")]
        public Task Delete(List<Guid> ids)
        {
            return _InventoryQuantityAppService.Delete(ids);
        }

        [HttpGet]
        [Route("{id}")]
        public Task<InventoryQuantityDto> Get(Guid id)
        {
            return _InventoryQuantityAppService.Get(id);
        }

        [HttpGet]
        public Task<PagedResultDto<InventoryQuantityDto>> GetAll(GetInventoryQuantityInputDto input)
        {
            return _InventoryQuantityAppService.GetAll(input);
        }
    }
}
